home *** CD-ROM | disk | FTP | other *** search
/ Agent Central Host Computer / Agent - Central Host Computer.iso / _SETUP.1 / vtokctprorphans.sql < prev    next >
Text File  |  2000-05-12  |  367b  |  8 lines

  1. CREATE OR REPLACE VIEW VTOKCTPRORPHANS AS 
  2. SELECT PRORPHANS.PRPEND_INDX,  
  3. PRORPHANS.LAST_CURSTATE,  
  4. SUM(DECODE(currency_type, 250, reset_count, 0)) sm_tokens,  
  5. SUM(DECODE(currency_type, 251, reset_count, 0)) lg_tokens  
  6. FROM PRORPHANS, CSCURCNT  
  7. WHERE CSCURCNT.det_seq_num =PRORPHANS.LAST_CURSTATE  
  8. GROUP BY PRORPHANS.PRPEND_INDX, PRORPHANS.LAST_CURSTATE;